<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}
	<div class="container containerUser fix pt15">
		{template member/slide}
		<div class="userRight">
			<div class="userTitle mgb10">下级报表</div> 
			<div class="userMain mgb10">
				<div id="timeType" class="newTab">
					<a {if !$timeLine} class="curr" {/if}>今天</a>
					<a {if $timeLine == "1"} class="curr" {/if}>昨天</a>
					<a {if $timeLine == "2"} class="curr" {/if}>本月</a>
					<a {if $timeLine == "3"} class="curr" {/if}>上个月</a>
				</div> 
				<div class="searchDetail">
					<table class="lowerReportTable">
						<tbody>
							<tr>
								<th>账号</th> 
								<th>用户类型</th> 
								<th>投注金额</th> 
								<th>中奖金额</th> 
								<th>返点金额</th> 
								<th>活动礼金</th> 
								<th>投注人数</th> 
								<th>盈利</th>
							</tr>
						</tbody> 
						<tbody class="_tableList">
							{if $data}
								{loop $data as $k => $v}
    								<tr>
    									<td>{$v['username']}</td>
    									<td>{if $v['user_type'] == 1} 代理 {else} 玩家 {/if}</td>
    									<td>{if $v['betAmount']} {$v['betAmount']} {else} 0 {/if}</td>
    									<td>{if $v['prizeAmount']} {$v['prizeAmount']} {else} 0 {/if}</td>
    									<td>{if $v['rpsAmount']} {$v['rpsAmount']} {else} 0 {/if}</td>
    									<td>0</td>
    									<td>{if $v['betUserNums']} {$v['betUserNums']} {else} 0 {/if}</td>
    									<td>{$v['prizeAmount'] - $v['betAmount']}</td>
    								</tr>
								{/loop}
							{else}
    							<tr style="border-bottom: 0px;">
    								<td colspan="100">
    									<div class="notContent" style="padding: 100px 0px;"><i class="iconfont"></i>暂无记录</div>
    								</td>
    							</tr>  
							{/if}
						</tbody>
					</table>
				</div> 
				<div class="page">
					<p>共<em>{$tmp['cnt']}</em>条记录</p> 
						<div id="pageNav" class="pageNav">
							{$multi}
						</div>
					</div>
				</div>
			</div>
	</div>
	<script>
		$('#timeType a').on('click', '', function (){
			window.location = "{U('member/lowerReport')}&timeline=" + $(this).index();
		})
	</script>
{template index/footer}